/**
 * Created by Administrator on 2017/1/22.
 */
$('.save').click(function () {
    var jointrader_select = $('#jointrader_select option:checked').test();//选择供应商
    var jointrader_phone = $('#jointrader_phone').val();//登录手机号
    var jointrader_name = $('#jointrader_name').val();//商家名称
    var jointrader_adress = $('#jointrader_adress').val();//地址
    var jointrader_text = $('#jointrader_text').val();//经营种类
    if(jointrader_select == '' || jointrader_select == null || jointrader_select ==undefined){
        layer.msg('请选择供应商');
    }else
    if(jointrader_phone == '' || jointrader_phone == null || jointrader_phone ==undefined){
        layer.msg('登录手机号不能为空');
    }else
    if(jointrader_name == '' || jointrader_name == null || jointrader_name ==undefined){
        layer.msg('商家名称不能为空');
    }else
    if(jointrader_adress == '' || jointrader_adress == null || jointrader_adress ==undefined){
        layer.msg('地址不能为空');
    }else{
        $.ajax({
            type:'post',
            url:'',
            contentType:'application/json',
            data:JSON.stringify({}),
            dataType:'json',
            success:function (res) {
                $('.indexlist').show();
                $('.newtankuang').hide();
            },
            error:function (res) {
                
            }
        })
    }
});